package com.jt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@PropertySource(value = "classpath:/properties/user.properties",encoding = "utf-8")
public class UserController {
    @Value("${user.username}")
    private String name;
    @Value("${user.id}")
    private Integer id;
    @GetMapping("/getMsg")
    public String  getMsg(){
       return id+":"+name;
    }
}

